<template>
<el-card>
    <template #header>{{title}}</template>
</el-card>
</template>

<script>
export default {
    name: "courseList",
    data() {
        return {
            title: this.$route.name
        }
    },
    watch: {
        '$route'(to, from) {
            this.fetchData();
        }
    },
    created() {
        this.fetchData();
    },
    methods: {
        fetchData() {
            this.title = this.$route.name;
        }
    }
}
</script>